Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Placeholder PR for cleaner diffs: Sourcemaps #3816

Closed
wants to merge 23 commits into from

Conversation

turt2live
Copy link
Member

This is never intended to be merged - it's just a combination of several paths of PRs so other PRs can be made linear.

Incorporates:

We use `export default` begrudgingly here. Ideally we'd use just `export`, though this entire SDK expects things to be exported as a default. Instead of breaking everything, we'll sacrifice our export pattern for a smaller diff - a later commit can always do the default export -> regular export conversion.
This is needed because `require()` means something different in webpack - it ends up importing the module as something we didn't expect (and is occasionally async)
require() is a bit weird for riot-web's webpack, so we fork it out to its own function to reduce the weirdness. 

The added weirdness is that require() is sync though exports a module instead. If we use import(), we get a promise which doesn't help us here. We therefore have to require() and pull out the default export, though this is only a problem for webpack - babel (our chosen compiler for exporting ES6) doesn't need this, hence the if statement.
This is a similar fix to 18ac2db
@turt2live
Copy link
Member Author

This isn't needed for diffs anymore.

@turt2live turt2live closed this Jan 8, 2020
@turt2live turt2live deleted the travis/sourcemaps-dev branch January 9, 2020 21:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant